package com.abm.dbclases;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/*
 * @DatabaseField(foreign = true, canBeNull = true)
 private InstallationType installationType;
 */
@DatabaseTable(tableName = "Product")
public class Product {
	@DatabaseField(generatedId = true, canBeNull = false)
	private int id;

	@DatabaseField(canBeNull = false)
	private String name;

	@DatabaseField(canBeNull = false)
	private int quantity;

	@DatabaseField
	private String description;

	@DatabaseField
	private String photo;

	@DatabaseField(foreign = true, foreignAutoRefresh = true)
	private Category category;

	


	public Product() {
	}

	public Product(String name, int quantity, Category category, String description) {
		super();
		//this.id = id;
		this.name = name;
		this.quantity = quantity;
		this.description = description;
		this.category = category;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return description;
	}

	public void setAddress(String address) {
		this.description = address;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public CharSequence getDesc() {
		return this.description;
	}

}
